package day10;

import linear.SqStack;

public class 栈测试类 {
    public static void main(String[] args) throws Exception {
        SqStack<String> sq = new SqStack(10);
        sq.push("x");
        sq.push("y");
        sq.push("z");
        sq.push("a");
        System.out.println(sq.peek());
        System.out.println("------栈元素显示------");
        sq.display();
        String s1;
        System.out.println("\n-------出栈操作------");
        s1 = sq.pop();
        System.out.println(s1);
        System.out.println("\n------栈元素显示------");
        sq.display();
        System.out.println("\n-------出栈操作------");
        s1 = sq.pop();
        System.out.println(s1);
    }
}
